import { http } from "@/utils";

export function getDictTypeList(params = {}) {
  return http.post("/system/dictType/list", params);
}

export function getDictType(id) {
  return http.get(`/system/dictType/detail/${id}`);
}

export function addDictType(params) {
  return http.post("/system/dictType/insert", params);
}

export function updateDictType(params) {
  return http.post("/system/dictType/update", params);
}

export function deleteDictType(dictId) {
  return http.post("/system/dictType/delete", dictId);
}

export function deleteBatchDictType(dictIds) {
  return http.post("/system/dictType/deleteBatch", dictIds);
}

export function getExportParams() {
  return http.get("/system/dictType/export/params");
}

export function exportDictType(params = {}) {
  return http.post("/system/dictType/export", params, {
    responseType: "blob",
  });
}
